<?php
$sh_languages['pascal'] = array(
    // State #0
    array(
        array(
            '/\b(?:alfa|and|array|begin|case|const|div|do|downto|else|end|false|file|for|function|get|goto|if|in|label|mod|new|not|of|or|pack|packed|page|program|put|procedure|read|readln|record|repeat|reset|rewrite|set|text|then|to|true|type|unpack|until|var|while|with|writeln|write)\b/i',
            'sh_keyword',
            -1
        ),
        array(
            '/\(\*/i',
            'sh_comment',
            1
        ),
        array(
            '/\{/i',
            'sh_comment',
            2
        ),
        array(
            '/\b[+-]?(?:(?:0x[a-f0-9]+)|(?:(?:[\d]*\.)?[\d]+(?:[eE][+-]?[\d]+)?))u?(?:(?:int(?:8|16|32|64))|L)?\b/i',
            'sh_number',
            -1
        ),
        array(
            '/"/i',
            'sh_string',
            3
        ),
        array(
            '/\'/i',
            'sh_string',
            4
        ),
        array(
            '/\b(?:boolean|byte|char|integer|maxint|real)\b/i',
            'sh_type',
            -1
        ),
        array(
            '/~|!|%|\^|\*|\(|\)|-|\+|=|\[|\]|\\\\|:|;|,|\.|\/|\?|&|<|>|\|/i',
            'sh_symbol',
            -1
        ),
        array(
            '/(?:[a-z]|_)[a-z0-9_]*(?=[ \t]*\()/i',
            'sh_function',
            -1
        )
    ),
    // State #1
    array(
        array(
            '/\*\)/i',
            'sh_comment',
            -2
        ),
        array(
            '/\(\*/i',
            'sh_comment',
            1
        )
    ),
    // State #2
    array(
        array(
            '/\}/i',
            'sh_comment',
            -2
        ),
        array(
            '/\{/i',
            'sh_comment',
            2
        )
    ),
    // State #3
    array(
        array(
            '/$/i',
            null,
            -2
        ),
        array(
            '/\\\\(?:\\\\|")/i',
            null,
            -1
        ),
        array(
            '/"/i',
            'sh_string',
            -2
        )
    ),
    // State #4
    array(
        array(
            '/$/i',
            null,
            -2
        ),
        array(
            '/\\\\(?:\\\\|\')/i',
            null,
            -1
        ),
        array(
            '/\'/i',
            'sh_string',
            -2
        )
    )
);
